<template>
  <div>
    <h1>page1</h1>
    <!--<h3 v-for="(item, key) in $store.state.arr" :key="key">{{item}}</h3>-->
    <input type="text" :placeholder="a"><br>
    <h1>{{b}}</h1>
    <button @click="delayChange">delay</button>
    <h2 v-for="(item, key) in this.$store.state.array" :key="key">{{item}}</h2>
  </div>
</template>
<script>
import {mapState, mapGetters, mapMutatinos, mapActions} from 'vuex';
export default {
  name: "page1",
  data(){
    return {}
  },
  methods: {
    ...mapActions(['delayChange']),
  },
  computed:{
    ...mapState(['b','a', 'arr'])
  },
  created() {
    console.log(this.$store.state.array);
  }
}
</script>

<style scoped>
  *{
    font-size: 20px;
  }
</style>
